//
//  GYRefundList.m
//  GoodLuck
//
//  Created by 丁燕春 on 2018/3/25.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import "GYRefundList.h"
#import "GYOrderGoods.h"

@implementation GYRefundList

+ (NSMutableArray *)jsonRefundList:(NSArray *)source {
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in source) {
        GYRefundList *refundlist = [[GYRefundList alloc] initWithDic:dic];
        [array addObject:refundlist];
    }
    
    return array;
}


- (instancetype)initWithDic:(NSDictionary *)dic {
    if ([super init]) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return  self;
}

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    
    if ([key isEqualToString:@"goods_list"]) {
        self.goods_list = [GYOrderGoods loadOrderGoods:value];
        
        return;
    }
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

@end
